﻿using Autodesk.Revit.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace RevitAddin
{
    public partial class frmFamilySettings : Form
    {
        private TFCodeCMD TFCodeCMD = null;
        private ExternalEvent TFCodeCMDEvent = null;
        public frmFamilySettings()
        {
            InitializeComponent();
            TFCodeCMD = new TFCodeCMD();
            TFCodeCMDEvent = ExternalEvent.Create(TFCodeCMD);
        }

        private void tCodeBtn_Click(object sender, EventArgs e)
        {
            if (twoRadioButton.Checked)
            {
                TFCodeCMD.myCount = 2;
            }
            if (threeRadioButton.Checked)
            {
                TFCodeCMD.myCount = 3;
            }
            TFCodeCMD.isTCode = true;
            TFCodeCMDEvent.Raise();
        }

        private void fCodeBtn_Click(object sender, EventArgs e)
        {
            if (twoRadioButton.Checked)
            {
                TFCodeCMD.myCount = 2;
            }
            if (threeRadioButton.Checked)
            {
                TFCodeCMD.myCount = 3;
            }
            TFCodeCMD.isTCode = false;
            TFCodeCMDEvent.Raise();
        }
    }
}
